package demo8;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("demo8") //该注解用于告知Spring容器扫描哪个包
public class Config {
    @Bean
    public Student initStudent(){
        return new Student();
    }
}
